package xinxin.com.DecoratorPattern;

import xinxin.com.DecoratorPattern.Finery.Finery;
import xinxin.com.DecoratorPattern.Finery.Wear.*;
import xinxin.com.DecoratorPattern.Person.Person;

public class DecoratorPattern {
    public static void main(String[] args) {
        Person person = new Person("史鑫鑫");
        System.out.println("第一种装扮：");
        Sneakers sneakers1 = new Sneakers();
        BigTrouser bigTrouser1 = new BigTrouser();
        TShirts tShirts1 = new TShirts();
        sneakers1.Decorate(person);
        bigTrouser1.Decorate(sneakers1);
        tShirts1.Decorate(bigTrouser1);
        tShirts1.Show();
        System.out.println("第二种装扮：");
        Sneakers sneakers2 = new Sneakers();
        LeatherShoes leatherShoes2 = new LeatherShoes();
        BigTrouser bigTrouser2 = new BigTrouser();
        Tie tie2 = new Tie();
        sneakers2.Decorate(person);
        leatherShoes2.Decorate(sneakers2);
        bigTrouser2.Decorate(leatherShoes2);
        tie2.Decorate(bigTrouser2);
        tie2.Show();
    }
}
